<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 */

get_header(); 

$span = "span12";
if(is_active_sidebar( 'sidebar-1' )){
	$span = "span9";
}
?>
	
		<div class="<?php echo $span;?>">
			<div id="primary" class="site-content">
				<div id="content" role="main">

					<?php while ( have_posts() ) : the_post(); ?>
						<?php get_template_part( 'content', 'page' ); ?>
						<?php comments_template( '', true ); ?>
					<?php endwhile; // end of the loop. ?>

				</div><!-- #content -->
			</div><!-- #primary -->
		</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>